 <link href="<?= STATICURL; ?>css/bootstrap.min.css" rel="stylesheet" />
    <link id="bootstrap-rtl-link" href="" rel="stylesheet" />
    <link href="<?= STATICURL; ?>css/font-awesome.min.css" rel="stylesheet" />
    <link href="<?= STATICURL; ?>css/weather-icons.min.css" rel="stylesheet" />
    <!--Fonts-->
    <link href="http://fonts.useso.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,600,700,300" rel="stylesheet" type="text/css">
    <!--Beyond styles-->
    <link id="beyond-link" href="<?= STATICURL; ?>css/beyond.min.css" rel="stylesheet" type="text/css" />
    <link href="<?= STATICURL; ?>css/demo.min.css" rel="stylesheet" />
    <link href="<?= STATICURL; ?>css/typicons.min.css" rel="stylesheet" />
    <link href="<?= STATICURL; ?>css/animate.min.css" rel="stylesheet" />
    <link id="skin-link" href="" rel="stylesheet" type="text/css" />
    <div class="page-content">
        <div class="page-body">
            <div >
                <div id="horizontal-form">
                    <form class="form-horizontal" role="form">
                        <div class="row">
                            <div class="col-md-7">
                                <input type="text" name="name" placeholder="分类名称" class="form-control" value="<?= $CatInfo['name']?>">
                                <div class="horizontal-space"></div>
                            </div>
                             <div class="col-md-7">
                                <input type="text" name="name_en" placeholder="英文名称" class="form-control" value="<?= $CatInfo['name_en']?>">
                                <div class="horizontal-space"></div>
                            </div>
                        </div>
                        <div class="recent-posts" style="float: left">
                            <li class="cp_photo_con" style="list-style-type:none;">
                                <p ><span  id="J_morepic_upload"></span></p>
                            </li>
                        </div>
                        <div class="widget-content" style="float: right">
                            <ul class="thumbnails picList">
                            <?php if($CatInfo['imgurl']):?>
                                    <li style="list-style-type:none;">
                                        <a> <img class="imgurl" src="<?= $CatInfo['imgurl'] ?>" width="170" height="100" alt="" > </a>
                                    </li>
                            <?php endif?>
                            </ul>
                        </div>
                        <input type="text" name="sort_order" placeholder="排序" class="form-control" value="<?= $CatInfo['sort_order']?>">
                        <div class="horizontal-space"></div>
                        <div>
                            <span id="editCat" class="btn btn-default">提交</span>
                        </div>
                    </form>
                </div>
            </div>
        </div>
        <input type="hidden" id="idpalce" value="<?php echo $CatInfo['id']?>" />
<script src="<?php echo STATICURL; ?>js/jquery-2.0.3.min.js"></script>
<script src="<?php echo STATICURL; ?>js/bootstrap.min.js"></script>
<script src="<?php echo STATICURL; ?>layer/layer.js"></script>
<script src="<?= STATICURL; ?>kindeditor/kindeditor.js"></script>

<?php require_once ADMINVIEWPATH.'admin_footer.php'; ?>
<script src="<?php echo STATICURL; ?>js/swfupload.js"></script>
<script src="<?php echo STATICURL; ?>js/swfupload.queue.js"></script>
<script src="<?php echo STATICURL; ?>js/fileprogress.js"></script>
<script src="<?php echo STATICURL; ?>js/handlers.js"></script>
<script>
    $(document).ready(function() {
        $("#editCat").click(function(){
            var cover = $(".imgurl").attr("src");
            var sort_order = $("input[name='sort_order']").val();
            var name = $("input[name='name']").val();
            var name_en = $("input[name='name_en']").val();
            var id = $("#idpalce").val();
            var type = "<?=$type?>";
            if(cover == ""){
                layer.msg("背景图片不能为空");return false;   
            }
            $.post("<?=BASEURL?>luckydog/category/editCat", {name_en:name_en,"sort_order":sort_order,"name":name,"cover":cover,"id":id,"type":type}, function(res) {
                if (res) {
                    window.parent.location.reload();
                }else{
                    layer.msg("失败");
                }
            });
        });
    });

      $(function(){
        var settings = {
            flash_url : "<?php echo STATICURL; ?>js/swfupload.swf",
            upload_url: "<?=BASEURL?>luckydog/category/upload_cover.json",
            post_params: {"is_more" : "yes"},
            file_size_limit : "100 MB",
            file_types : "*.jpg;*.gif;*.jpeg;*.png;",
            file_upload_limit : 100,
            file_queue_limit : 100,
            custom_settings : {
                progressTarget : "fsUploadProgress",
                cancelButtonId : "btnCancel"
            },
            debug : false,
            // Button settings
            button_width : "114",
            button_height : "32",
            button_placeholder_id : "J_morepic_upload",
            button_text_style : ".theFont { font-size: 16;}",
            button_cursor:-2,
            button_window_mode:"TRANSPARENT",
            button_action:-110,//-110多图片上传，-100但图片上传，-120文件上传
            button_image_url : "<?php echo STATICURL; ?>img/banner_upload_place.png",

            file_queued_handler : fileQueued,
            file_queue_error_handler : fileQueueError,
            file_dialog_complete_handler : fileDialogComplete,
            upload_start_handler : banner_uploadStart,
            upload_progress_handler : uploadProgress,
            upload_error_handler : uploadError,
            upload_success_handler : banner_upload_Success,
            upload_complete_handler : uploadComplete
        };
        swfu = new SWFUpload(settings);
    }())
</script>


